import type { ComponentRefType, ComponentType } from "@/typings/dynamic-search";
import Input from "./input/Index.vue";
import Select from "./select/Index.vue";
import DatePicker from "./data-picker/Index.vue";

const componentMap: ComponentRefType = {
  Input: Input,
  Select: Select,
  DatePicker: DatePicker,
};

export const getComponent = (type: ComponentType) => {
  return componentMap[type];
};

export { Input, Select };
